package com.ruoyi.wq.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wq.mapper.WqQuestionReplyMapper;
import com.ruoyi.wq.domain.WqQuestionReply;
import com.ruoyi.wq.service.IWqQuestionReplyService;

/**
 * 回复提问Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-04
 */
@Service
public class WqQuestionReplyServiceImpl extends ServiceImpl<WqQuestionReplyMapper, WqQuestionReply> implements IWqQuestionReplyService {

    @Autowired
    private WqQuestionReplyMapper wqQuestionReplyMapper;

    /**
     * 查询回复提问
     * 
     * @param id 回复提问主键
     * @return 回复提问
     */
    @Override
    public WqQuestionReply selectWqQuestionReplyById(String id)
    {
        return wqQuestionReplyMapper.selectWqQuestionReplyById(id);
    }

    /**
     * 查询回复提问列表
     * 
     * @param wqQuestionReply 回复提问
     * @return 回复提问
     */
    @Override
    public List<WqQuestionReply> selectWqQuestionReplyList(WqQuestionReply wqQuestionReply)
    {
        return wqQuestionReplyMapper.selectWqQuestionReplyList(wqQuestionReply);
    }

    /**
     * 新增回复提问
     * 
     * @param wqQuestionReply 回复提问
     * @return 结果
     */
    @Override
    public int insertWqQuestionReply(WqQuestionReply wqQuestionReply)
    {
        wqQuestionReply.setCreateTime(DateUtils.getNowDate());
        return wqQuestionReplyMapper.insertWqQuestionReply(wqQuestionReply);
    }

    /**
     * 修改回复提问
     * 
     * @param wqQuestionReply 回复提问
     * @return 结果
     */
    @Override
    public int updateWqQuestionReply(WqQuestionReply wqQuestionReply)
    {
        wqQuestionReply.setUpdateTime(DateUtils.getNowDate());
        return wqQuestionReplyMapper.updateWqQuestionReply(wqQuestionReply);
    }

    /**
     * 批量删除回复提问
     * 
     * @param ids 需要删除的回复提问主键
     * @return 结果
     */
    @Override
    public int deleteWqQuestionReplyByIds(String[] ids)
    {
        return wqQuestionReplyMapper.deleteWqQuestionReplyByIds(ids);
    }

    /**
     * 删除回复提问信息
     * 
     * @param id 回复提问主键
     * @return 结果
     */
    @Override
    public int deleteWqQuestionReplyById(String id)
    {
        return wqQuestionReplyMapper.deleteWqQuestionReplyById(id);
    }
}
